#include <cstdio>

int main( )
{
    int n, t, cas = 1;
    double p, sum, q;
    scanf("%d", &t);
    while ( t-- )
    {
        scanf("%d", &n);
        scanf("%lf", &p);
        sum = p; n--;
        while ( n-- )
        {
            scanf("%lf", &q);
            sum += q;
        }
        printf("Case %d: %.6lf\n", cas++, p / sum);
    }
    return 0;
}
